![]() |
Synalyze It!
1.10
|
Public Member Functions | |
| Element | Element (ELEMENT_TYPE type, String name, bool setDefaults) |
| Constructor. More... | |
| String | getName () |
| Get name. More... | |
| setName (String name) | |
| Set name. More... | |
| String | getDescription () |
| Get description. More... | |
| setDescription (String name) | |
| Set description. More... | |
| setDisabled (BOOL disabled) | |
| Set disabled. More... | |
| addFixedValue (Value value) | |
| Add fixed value. More... | |
| Structure | getEnclosingStructure () |
| Get enclosing structure. More... | |
| String | getLength () |
| Get length. More... | |
| LENGTH_UNIT | getLengthUnit () |
| Get length unit. More... | |
| setColorRgb (float red, float green, float blue) | |
| Set fill color (RGB). More... | |
| setLength (String length, LENGTH_UNIT lengthUnit) | |
| Set length. More... | |
| ELEMENT_TYPE | getType () |
| Get type. More... | |
| bool | mustMatch () |
| Get "must match" flag. More... | |
| setMustMatch (BOOL mustMatch) | |
| Set "must match" flag. More... | |
| Value | getMinValue () |
| Get minimum value. More... | |
| Value | getMaxValue () |
| Get maximum value. More... | |
| Element | getParent () |
| Get parent. More... | |
The Element class.
An element object represents one item in a structure.
Constructor.
Create object of type Element.
| [in] | type | The type of the element |
| [in] | name | The name of the element |
| [in] | setDefaults | Set defaults for element? |
| addFixedValue | ( | Value | value | ) |
Add fixed value.
Add fixed value to element.
| [in] | value | The actual value |
| String getDescription | ( | ) |
Get description.
Get description of element.
| Structure getEnclosingStructure | ( | ) |
Get enclosing structure.
Get the enclosing structure of the element.
| String getLength | ( | ) |
Get length.
Get length of element. For binary or string elements a length of zero means to fill the enclosing structure. Be aware that lengths can be fractions of bytes so call additionally getLengthUnit()
| LENGTH_UNIT getLengthUnit | ( | ) |
Get length unit.
Get length unit of element. Valid values are
| Value getMaxValue | ( | ) |
Get maximum value.
Get maximum value of element. This is only valid for numbers. This value will be checked if the "must match" flag is set.
| Value getMinValue | ( | ) |
Get minimum value.
Get minimum value of element. This is only valid for numbers. This value will be checked if the "must match" flag is set.
| String getName | ( | ) |
| Element getParent | ( | ) |
Get parent.
Get parent of element. There is only a parent element if the enclosing structure is inherited from another structure.
| ELEMENT_TYPE getType | ( | ) |
Get type.
Get type of element. This can be one of
| bool mustMatch | ( | ) |
Get "must match" flag.
Get if this element has to match while parsing a file. For this check the min/max values are checked and if one of the fixed values matches (if at least one is defined)
| setColorRgb | ( | float | red, |
| float | green, | ||
| float | blue | ||
| ) |
Set fill color (RGB).
This color is displayed is background color for this element in the hex view.
| [in] | red | Red color component between 0.0 and 1.0 |
| [in] | green | Green color component between 0.0 and 1.0 |
| [in] | blue | Blue color component between 0.0 and 1.0 |
| setDescription | ( | String | name | ) |
Set description.
Set description of element.
@author Andreas Pehnack @date 2012-05-11
| [in] | name | The new description of the element |
| setDisabled | ( | BOOL | disabled | ) |
Set disabled.
Set disabled flag of element. The element is not processed.
| [in] | disabled | New disabled state of element |
| setLength | ( | String | length, |
| LENGTH_UNIT | lengthUnit | ||
| ) |
Set length.
Set length of element. For binary or string elements a length of zero means to fill the enclosing structure. The length can contain variables and expressions. For number and binary elements you can specify a length unit LENGTH_UNIT_BITS additionally to LENGTH_UNIT_BYTES.
| [in] | length | The new length of the element |
| [in] | lengthUnit | The new length unit (bits/bytes) of the element |
| setMustMatch | ( | BOOL | mustMatch | ) |
Set "must match" flag.
Set if this element has to match while parsing a file. For this check the min/max values are checked and if one of the fixed values matches (if at least one is defined)
| setName | ( | String | name | ) |
Set name.
Set name of element.
| [in] | name | The new name of the element |
1.8.14